function count_up(){
    document.getElementById("count_input").value=parseInt(document.getElementById("count_input").value)+1;
}
function count_down(){
    if( document.getElementById("count_input").value>1)
    {
        document.getElementById("count_input").value=parseInt(document.getElementById("count_input").value)-1;
    }
    else{
        alert("数量不能为0！");
    }
}
function buy(){
    var a=document.getElementById("count_input").value;
    if (!(/(^[1-9]\d*$)/.test(a))) {
        alert("请输入正整数");
        return false;
    }
    return true;
}
